package com.dycx.api.controller;

import com.dycx.common.RestResponse;
import com.dycx.common.vendor.kaptcha.KaptchaImage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping()
public class KaptchaController {

    @Resource
    private KaptchaImage kaptchaImage;

    @RequestMapping(path = "/kaptcha", method = RequestMethod.GET)
    public RestResponse<?> getKaptcha() {
        return RestResponse.success(kaptchaImage.create());
    }

}
